<?php defined('IN_IA') or exit('Access Denied');?><!doctype html>
<html>
<head>
    <title>家宴</title>
    <meta charset="utf-8" />
    <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type" />
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control" />
    <meta content="no-cache" http-equiv="pragma" />
    <meta content="0" http-equiv="expires" />
    <meta content="telephone=no, address=no" name="format-detection" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <link type="text/css" rel="stylesheet" href="<?php echo RESNEW;?>css/style.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo RES;?>css/wei_canyin.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo RES;?>css/wei_dialog.css" />
    <link href='<?php echo RES;?>css/member.css' rel='stylesheet' type='text/css' />
    <script src="<?php echo RESNEW;?>js/jquery.js"></script>
    <script type="text/javascript" src="<?php echo RES;?>js/wei_webapp_v2_common.js"></script>
    <script type="text/javascript" src="<?php echo RESNEW;?>js/TouchSlide.1.1.js"></script>
    <script type="text/javascript">
        /*
         if(/Android (\d+\.\d+)/.test(navigator.userAgent)){
         var version = parseFloat(RegExp.$1);
         if(version>2.3){
         var phoneScale = parseInt(window.screen.width)/640;
         document.write('<meta name="viewport" content="width=640, minimum-scale = '+ phoneScale +', maximum-scale = '+ phoneScale +', target-densitydpi=device-dpi">');
         }else{
         document.write('<meta name="viewport" content="width=640, target-densitydpi=device-dpi">');
         }
         }else{
         document.write('<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">');
         }
         */
    </script>
<body style='background-color: #000;'>
<?php  include $this->template(common_search, TEMPLATE_INCLUDEPATH);?>
<?php  
if(!empty($bannerlist)){
?>
<div id="slideBox" class="slideBox">
    <div class="bd">
        <ul>
            <?php  if(is_array($bannerlist)) { foreach($bannerlist as $row) { ?>
            <li>
                <a class="pic" href="<?php  echo $row['url'];?>"><img src="<?php  echo $row['thumb'];?>" height="150" /></a>
                <a class="tit" href="<?php  echo $row['url'];?>"><?php  echo $row['title'];?></a>
            </li>
            <?php  } } ?>
        </ul>
    </div>
    <div class="hd"><ul></ul></div></div>
<script type="text/javascript">
    TouchSlide({
        slideCell:"#slideBox",
        titCell:".hd ul",
        mainCell:".bd ul",
        effect:"leftLoop",
        autoPage:true,
        autoPlay:true
    });
</script>
<?
}else{
?>
<div style="clear: both;margin-top: 2.5rem;"></div>
<?   
}
?>
<section style="display: block; " class="cheflist"  id="c_lists">
<ul id="c1">
    
</ul>
    
<ul style="display:none;" id="c2">
    <li><p style="text-align:center;padding-top:1.5rem"><a class="more"  href="javascript:loading('<?php  echo $q;?>',<?php  echo $sdate;?>);" readonly>加载更多</a></p></li>
</ul>
    
</section>
<div id="ft" style="clear: both;">
    <a href="tel:4008108888">400-810-8888</a>
</div>

</body>
<script>
    page=1;
    function loading(keyws,sdate){
        var tpl='';
        $.ajax({
                    url:"<?php  echo  $this->createMobileUrl('wlajsearch')?>",
                    data:{'page':page,'q':keyws,'sdate':sdate},
                    type:'POST',
                    dataType:'json',
                    cache:false,
                    beforeSend:function(){
                        MLoading.show('加载中');
                    },
                    success:function(msgObj){
                        MLoading.hide();
                        if(msgObj.flag!=1){
                            alert('抱歉，已加载完毕');
                            return false;
                        }else{
                            for(var i in msgObj){
                                if(i!='page'&&i!='flag'&&i!='count_all'&&i!='count'&&i!='pagesize'){
                                tpl+="<a href="+msgObj[i].detaillink+"><li><div class='chefavatar'><img src='/"+msgObj[i].thumb+"'/></div>";
            if(msgObj[i].description1==''){
            tpl+="<div class='chefcontent'><p class='cheftitle'>暂无描述";
            }else{
            tpl+="<div class='chefcontent'><p class='cheftitle'>"+msgObj[i].description1+"";  
            }
            if(msgObj[i].description2==''){
            tpl+="<br />暂无描述</p>";
            }else{
            tpl+="<br />"+msgObj[i].description2+"</p>";   
            }
            tpl+="<p class='chefname'>"+msgObj[i].name+"</p></div>";
            tpl+="<div class='caixilogo'>"+msgObj[i].cuisine_img+"</div></li></a>";
                                }
                            }
                            if(msgObj.count>=msgObj.pagesize&&(msgObj.count_all-msgObj.count)>0){
                                $("#c2").css('display','block');
                            }else{
                                $("#c2").css('display','none');
                            }
                        }
                        page=msgObj.page;
                        $("#c1").append(tpl);
                      
                    }
                });
    }
    loading('<?php  echo $q;?>');
</script>
</html>